package com.liangzi.service_core.pojo.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="VisitMedicalCard对象", description="就诊卡表")
public class VisitMedicalCardVO  {
    public static final String PHONE_REG = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$";
    public static final String ID_CARD_REG = "(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)";
    public static final String NAME_REG = "^[\\u4e00-\\u9fa5]{2,4}$";

    @ApiModelProperty(value = "用户ID")
    private String userId;
    @ApiModelProperty(value = "就诊卡ID")
    private String medicalCardId;


    @ApiModelProperty(value = "就诊卡用户的身份证号")
    @NotNull(message = "就诊卡用户的身份证号 cannot be null")
    @Pattern(regexp = ID_CARD_REG,message = "身份证不合法")
    private String medicalCardUserIdcard;


    @ApiModelProperty(value = "就诊卡用户手机号")
    @NotNull(message = "就诊卡用户手机号 cannot be null")
    @Pattern(regexp = PHONE_REG,message = "手机号不合法")
    private String medicalCardPhone;


    @ApiModelProperty(value = "就诊卡人姓名")
    @NotNull(message = "就诊卡人姓名 cannot be null")
    @Pattern(regexp = NAME_REG,message = "姓名不合法")
    private String medicalCardName;


}